import java.util.Scanner;

public class Main {
    /**
     * JAVA49 判断素数个数
     * @param args
     */
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int start = scanner.nextInt();
        int end = scanner.nextInt();
        method(start,end);
    }

    public static void method(int start, int end) {
        int count=0;

        //write your code here......
    
        if (start > end){
           int tmp = start;
            start = end;
            end = tmp;
        }
       int i = (start>3)?start:3;
        for(;i<=end;i++){
            boolean flag = false;
            for (int j = 2;j<i;j++){
                if (i % j == 0){
                    flag = true;
                    break;
                }
            }
            if (!flag){
                count++;
            }
        }

        System.out.println(start+"到"+end+"之间有"+count+"个大于2的素数");
    }
}